package com.fcscs.cservice.client.common.model.reservation;

import java.util.Collection;
import java.util.Map;

import com.fcscs.core.gwt.common.NonDomainModelData;
import com.fcscs.cservice.client.common.CServiceConstants;
import com.fcscs.cservice.domain.model.RateView;
import com.fcscs.share.gwt.common.ShareGWTConstants;

public class RateViewModelData extends NonDomainModelData<RateView> {

	public RateViewModelData(RateView t) {
		super(t);
	}

	@Override
	protected void populateNames(Collection<String> tempNames) {
		tempNames.add(ShareGWTConstants.FROM);
		tempNames.add(ShareGWTConstants.TO);
		tempNames.add(CServiceConstants.RATE);
	}

	@Override
	protected void populateProps(Map<String, Object> props) {
		props.put(ShareGWTConstants.FROM, CServiceConstants.DATE_FORMAT1.format(entity.getFromDate()));
		props.put(ShareGWTConstants.TO, CServiceConstants.DATE_FORMAT1.format(entity.getToDate()));
		props.put(CServiceConstants.RATE, entity.getRate().toString());
	}

	@Override
	protected <X> void setProperty(String property, X value) {
		// TODO Auto-generated method stub
		
	}

}
